<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateAkbusInsureTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('akbus_insure', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->unsignedBigInteger('bus_id')->nullable()->comment('车辆id');
            $table->text('merc_type')->nullable()->comment('商业险类型');
            $table->decimal('merc_money',10,2)->nullable()->comment('商业险金额');
            $table->date('merc_time')->nullable()->comment('商业险投保时间');
            $table->date('merc_start_date')->nullable()->comment('商业险开始时间');
            $table->date('merc_end_date')->nullable()->comment('商业险结束时间');
            $table->date('force_time')->nullable()->comment('强险投保时间');
            $table->decimal('force_money',10,2)->nullable()->comment('强险金额');
            $table->date('force_start_date')->nullable()->comment('强险开始时间');
            $table->date('force_end_date')->nullable()->comment('强险结束时间');
            $table->decimal('liability_money',10,2)->nullable()->comment('承运人责任险金额');
            $table->tinyInteger('liability_seat_num')->nullable()->comment('投保座位数');
            $table->date('liability_time')->nullable()->comment('投保时间');
            $table->date('liability_start_date')->nullable()->comment('保险开始时间');
            $table->date('liability_end_date')->nullable()->comment('保险结束时间');

            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('akbus_insure');
    }
}
